package cursojava;

import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

import org.junit.Test;


public class ExampleTestFormatDate {

	@Test public void formatoFechas(){
		Format formatter;
		Date date = new Date();
		
		formatter = new SimpleDateFormat("MM/dd/yy");
		String s = formatter.format(date);
		
		System.out.println(s);
		
		formatter = new SimpleDateFormat("dd-MMM-yy");
		s = formatter.format(date);
		System.out.println(s);

		formatter = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss");
		s = formatter.format(date);
		System.out.println(s);
	
		
		formatter = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss Z",Locale.ITALY);
		s = formatter.format(date);
		System.out.println(s);
	}
}
